package com.sinoglobal.ningxia.beans;

import com.sinoglobal.ningxia.frame.FlyApplication;
import com.sinoglobal.ningxia.utils.ItktLog;

import net.tsz.afinal.annotation.sqlite.Id;
import net.tsz.afinal.annotation.sqlite.Property;

/**
 * 
 * @author lgy
 * @createdate 2014-5-7 上午11:25:47
 * @Description: TODO(用一句话描述该类做什么) 系统推送消息 
 * "id": 86, 
 * "title": "消息",//标题
 *               "content": "内容",//内容 
 *               "createDate": 1398309260000,//创建时间
 */
public class SysMessageVo {
	@Id(column="_id")
    private String mIdentifier=hashCode()+"";
	@Property(column="identify")
	private String id;
	private String title;
	private String content;
	private String createDate;
//	@Property(column="user_id")
	private String userId;
   

	public String getMIdentifier() {
		return mIdentifier;
	}

	public void setMIdentifier() {
		this.mIdentifier =userId+mIdentifier;
	}

	public String getId() {
		return id;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public void setId(String id) {
		this.id = id;
		this.userId=FlyApplication.userId;
		this.mIdentifier=userId+id;
		ItktLog.d("sysMsg.userId=="+userId+",sysMsg.mIdentifier="+mIdentifier);
	
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getCreateDate() {
		return createDate;
	}

	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((content == null) ? 0 : content.hashCode());
		result = prime * result
				+ ((createDate == null) ? 0 : createDate.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((title == null) ? 0 : title.hashCode());
		result = prime * result + ((userId == null) ? 0 : userId.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SysMessageVo other = (SysMessageVo) obj;
		if (content == null) {
			if (other.content != null)
				return false;
		} else if (!content.equals(other.content))
			return false;
		if (createDate == null) {
			if (other.createDate != null)
				return false;
		} else if (!createDate.equals(other.createDate))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (title == null) {
			if (other.title != null)
				return false;
		} else if (!title.equals(other.title))
			return false;
		if (userId == null) {
			if (other.userId != null)
				return false;
		} else if (!userId.equals(other.userId))
			return false;
		return true;
	}
	

}
